﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace PDFDesign.Model
{
    /// <summary>
    /// 行
    /// </summary>
    public class RowControl
    {
        /// <summary>
        /// 行名称
        /// </summary>
        [JsonIgnore]
        public string Name { get; set; } = "I'm a row.";
        /// <summary>
        /// 是否为表头行
        /// </summary>
        [JsonProperty("isHeader")]
        public bool IsHeader { get; set; }
        /// <summary>
        /// 是否为固定行：固定行需要每个表格都需要渲染,否则只在最后一个表格渲染
        /// </summary>
        [JsonProperty("isFixed")]
        public bool IsFixed { get; set; }
        /// <summary>
        /// 行高
        /// </summary>
        [JsonProperty("height", NullValueHandling = NullValueHandling.Ignore)]
        public float Height { get; set; }
        /// <summary>
        /// 单元格列表
        /// </summary>
        [JsonProperty("cells")]
        public List<CellControl> Cells { get; set; }
    }
}